<?php

use yii\helpers\Html;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $searchModel frontend\models\CartSeacher */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = 'Carts';
$this->params['breadcrumbs'][] = $this->title;
?>


<div class="cart-index">

    <h1><?php echo Html::encode($this->title) ?></h1>
    <?php echo $this->render('_search', ['model' => $searchModel]); ?>

    <p>
        <?php
        echo Html::a('Create Cart', ['create'], ['class' => 'btn btn-success'])
        ?>
    </p>
    <?php
    echo GridView::widget([
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'columns' => [
                ['class' => 'yii\grid\SerialColumn'],
            'cartId',
            'productId',
            'productnum',
            'price',
            'userId',
            // 'createTime',
            ['class' => 'yii\grid\ActionColumn'],
        ],
    ]);
    ?>
</div>
